<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib uri="/WEB-INF/autobase-taglib.tld" prefix="autobase"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<fmt:setBundle basename="bundles.autobaseAdminBundle" />

<div class="editOrder">
	<span class="nm"><fmt:message key="admin.order.edit" /></span>
	<form id="orderInfo" action="/admin/orders.do?action=editOrder" method="POST" >
		<table cellpadding="0" cellspacing="0" class="order">
			<tr>
				<c:set var="cName" value="${sessionScope['clientName'] }" scope="session"></c:set>
				<td class="c1"><fmt:message key="admin.orders.client.name" />:</td>
				<td class="c2"><c:out value="${cName }"></c:out></td>
			</tr>
			<tr>
				<c:set var="cPhone" value="${sessionScope['clientPhone'] }" scope="session"></c:set>
				<td class="c1"><fmt:message key="admin.orders.client.phone" />:</td>
				<td class="c2"><c:out value="${cPhone }" /></td>
			</tr>
			<tr>
				<td class="c1">
					<label for="driverId"><fmt:message key="admin.orders.driver.name" />:</label>
				</td>
				<td class="c2">
					<c:set var="drivers" value="${ requestScope['drivers'] }" />
					<select name="driverId">
						<c:forEach begin="0" var="driver" items="${drivers }" >
							<option value="${driver.id }"><c:out value="${driver.name }"></c:out></option>
						</c:forEach>
					</select>
				</td>
			</tr>
			<tr>
				<c:set var="oDescription" value="${sessionScope['orderDescription'] }" scope="session"></c:set>
				<td class="c1"><fmt:message key="admin.orders.order.conditions" /></td>
				<td class="c2">
					<textarea id="description" name="description" cols="47" readonly="readonly" rows="8"><c:out value="${oDescription }" />
					</textarea>
				</td>
			</tr>
			<tr>
				<td class="c1"></td>
				<td class="c2">
					<input type="submit" value='<fmt:message key="admin.order.add" />' name="submit"/> 
					<input type="button" id="close" value='<fmt:message key="admin.order.close" />'>	
				</td>
			</tr>
		</table>
		<c:set var="orderId" value="${sessionScope['orderId'] }" scope="session"></c:set>
		<input type="hidden" value='<c:out value="${orderId }" />' name="orderId" />
	</form>
</div>